#pragma once

#include <QPushButton>

class SettingBarButton : public QPushButton {
public:
	SettingBarButton(QString iconName, QWidget* parent = nullptr);
	void check();
	void uncheck();
	void disable();
	void enable();
	bool checked() const;
	~SettingBarButton();

protected:
	void enterEvent(QEnterEvent* ev);   //进入QWidget瞬间事件
	void leaveEvent(QEvent* ev);   //离开QWidget瞬间事件

private:
	bool m_checked = false;

	QString m_iconName = "";


	void changeIcon(QString icon);
	void defaultStyle();
	void checkStyle();
};
